<template>
	<view class="head">
		<view class="head-box">
			<view class="head-fl" @click="changeActive(0)" :class="activeIndex == 0 ? 'active' : ''">
				<text>选择家族分类</text>
			</view>
			<view class="head-cy" @click="changeActive(1)" :class="activeIndex == 1 ? 'active' : ''">
				<text>家族信息</text>
			</view>
			<view class="head-users" @click="changeActive(2)" :class="activeIndex == 2 ? 'active' : ''">
				<text>拉取群聊用户</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				activeIndex: 0
			}
		},
		methods: {
			changeActive(num) {
				this.activeIndex = num
				this.$emit('changeActive', num)
			}
		}
	}
</script>

<style scoped lang="scss">
	.active {
		border-bottom: 4rpx solid rgba(56, 56, 56, 1);
	}

	.head-box {
		position: fixed;
		z-index: 9;
		background: #fff;
		width: 100%;
		height: 100rpx;
		line-height: 100rpx;
		// padding: 30rpx 0;
		border-bottom: 2rpx solid rgba(229, 229, 229, 1);
		display: flex;

		view {
			margin: 0 30rpx;
			// padding: 10rpx 0;
		}

		text {
			color: rgba(0, 0, 0, 1);
			font-size: 28rpx;
			font-weight: 500;
		}
	}
</style>